package com.socodethis.spaceex.utils;

import com.badlogic.gdx.Gdx;
import com.socodethis.spaceex.SpaceExConstants;

public class ScreenSize {

	//Find the width and height difference between our build size and the real size
	public static double widthDiff(){
		double widthDiff = (double)(SpaceExConstants.SCREEN_WIDTH+(Gdx.graphics.getWidth()-SpaceExConstants.SCREEN_WIDTH))/(double)SpaceExConstants.SCREEN_WIDTH;
		return widthDiff;
	}
	public static double heightDiff(){
		double heightDiff = (double)(SpaceExConstants.SCREEN_HEIGHT+(Gdx.graphics.getHeight()-SpaceExConstants.SCREEN_HEIGHT))/(double)SpaceExConstants.SCREEN_HEIGHT;
		return heightDiff;
	}
	
	//Return the true width and height for the real size
	public static float getScaledWidth(double imgWidth){
		double width=imgWidth*widthDiff();
		return (float) width;
	}
	public static float getScaledHeight(double imgHeight){
		double height=imgHeight*heightDiff();
		return (float) height;
	}
}
